<%-- 
    Document   : add_akademik
    Created on : Jan 15, 2014, 1:39:42 PM
    Author     : Muhammad Dony
--%>

<%@page import="java.util.List"%>
<%@page import="data.AkademikData"%>
<%@include file="../User/header_user.jsp" %>
<%
    AkademikData dataAkademik = (AkademikData) request.getAttribute("dataAkademik");
    String action = (String) request.getAttribute("buttonName");
%>
        <div class="col-lg-10">
            <div class="row">
                <div class="col-lg-3 col-lg-offset-6 well margin-atas">
                    <form class="form-horizontal col-lg-12 text-center" action="akademik" role="form" method="POST" parsley-validate>
                        <div class="form-group">
                            <h2>Akademik</h2>
                            <div class="controls">
                                <label>ID</label>
                                <input class="form-control" type="hidden" name="no" parsley-trigger="change" value="<% if(action.equals("Edit")){ out.print(dataAkademik.getNomor()); }%>" />
                                <input class="form-control" type="hidden" name="status" parsley-trigger="change" value="<%if(action.equals("Edit")){ out.print(dataAkademik.getStatus()); } else { out.print("0"); }  %>" />
                                <input class="form-control" type="text" placeholder="Username" name="ID" parsley-trigger="change" value="<%=user.getID()%>" readonly />
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="controls">
                                <label>Semester</label>
                                <select name="semester" id="semester" class="form-control">  
                                    <option value="Semester 1" <% if(action.equals("Edit") && "Semester 1".equals(dataAkademik.getSemester())){out.print("selected");} %>> Semester 1 </option>
                                    <option value="Semester 2" <% if(action.equals("Edit") && "Semester 2".equals(dataAkademik.getSemester())){out.print("selected");} %>> Semester 2 </option>
                                    <option value="Semester 3" <% if(action.equals("Edit") && "Semester 3".equals(dataAkademik.getSemester())){out.print("selected");} %>> Semester 3 </option>
                                    <option value="Semester 4" <% if(action.equals("Edit") && "Semester 4".equals(dataAkademik.getSemester())){out.print("selected");} %>> Semester 4 </option>
                                    <option value="Semester 5" <% if(action.equals("Edit") && "Semester 5".equals(dataAkademik.getSemester())){out.print("selected");} %>> Semester 5 </option>
                                    <option value="Semester 6" <% if(action.equals("Edit") && "Semester 6".equals(dataAkademik.getSemester())){out.print("selected");} %>> Semester 6 </option>
                                    <option value="Semester 7" <% if(action.equals("Edit") && "Semester 7".equals(dataAkademik.getSemester())){out.print("selected");} %>> Semester 7 </option>
                                    <option value="Semester 8" <% if(action.equals("Edit") && "Semester 8".equals(dataAkademik.getSemester())){out.print("selected");} %>> Semester 8 </option>
                                    </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="controls">
                                <label>IPS</label>
                                <input class="form-control" type="text" name="ips" placeholder="IPS" value="<% if(action.equals("Edit")){ out.print(dataAkademik.getIPS()); }%>">
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="controls">
                                <label>IPK</label>
                                <input class="form-control" type="text" name="ipk" placeholder="IPK" value="<% if(action.equals("Edit")){ out.print(dataAkademik.getIPK()); }%>">
                            </div>
                            
                        </div>   
                        <div class="form-group">
                            <div class="controls">
                                <input type="submit" class="btn btn-primary form-control" name="action" value="<%=action%>">
                            </div>
                        </div>

                    </form>
                </div>
            </div>
        </div>
<%@include file="../User/footer_user.jsp" %>